package com.trs.entry;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

@Entity
@Table(name = "cqserver")
public class ServerInfo {

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private Integer id;
	private String name;
	private String realip;
	private String virip;
	private String area;
	private String stree;
	private String people;
	private String phone;
	private String chat;
	private String chatname;
	private String chatold;
	private String chatnew;
	@Column(columnDefinition = "INT default 0", nullable = false)
	private Integer status;
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") // 提交数据为@param
	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss") // 提交数据为json
	@Temporal(TemporalType.TIMESTAMP) // @TemporalType.(DATE,TIME,TIMESTAMP)分别Map java.sql.(Date,Time, Timestamp).
	private Date statusTime;// 发布时间
	@Column(columnDefinition = "INT default 0", nullable = false)
	private Integer issendDD;
	private String lxr;
	@Column(columnDefinition = "INT default 2", nullable = false)
	private Integer type;

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRealip() {
		return realip;
	}

	public void setRealip(String realip) {
		this.realip = realip;
	}

	public String getVirip() {
		return virip;
	}

	public void setVirip(String virip) {
		this.virip = virip;
	}

	public String getChat() {
		return chat;
	}

	public void setChat(String chat) {
		this.chat = chat;
	}

	public String getChatname() {
		return chatname;
	}

	public void setChatname(String chatname) {
		this.chatname = chatname;
	}

	public String getChatold() {
		return chatold;
	}

	public void setChatold(String chatold) {
		this.chatold = chatold;
	}

	public String getChatnew() {
		return chatnew;
	}

	public void setChatnew(String chatnew) {
		this.chatnew = chatnew;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public String getStree() {
		return stree;
	}

	public void setStree(String stree) {
		this.stree = stree;
	}

	public String getPeople() {
		return people;
	}

	public void setPeople(String people) {
		this.people = people;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Date getStatusTime() {
		return statusTime;
	}

	public void setStatusTime(Date statusTime) {
		this.statusTime = statusTime;
	}

	public Integer getIssendDD() {
		return issendDD;
	}

	public void setIssendDD(Integer issendDD) {
		this.issendDD = issendDD;
	}

	public String getLxr() {
		return lxr;
	}

	public void setLxr(String lxr) {
		this.lxr = lxr;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	@Override
	public String toString() {
		return "ServerInfo [id=" + id + ", name=" + name + ", realip=" + realip + ", virip=" + virip + ", area=" + area + ", stree=" + stree + ", people=" + people + ", phone=" + phone + ", chat=" + chat + ", chatname=" + chatname + ", chatold=" + chatold + ", chatnew=" + chatnew + ", status=" + status + ", statusTime=" + statusTime + ", issendDD=" + issendDD + ", lxr=" + lxr + ", type=" + type + "]";
	}

}
